package demo2;
//
//import java.util.Scanner;
//public class Main {
//    static int[] tree;
//    static int index;
//    public static void main(String[] args) {
//        Scanner scanner = new Scanner(System.in);
//        int n = scanner.nextInt();
//        int[] posOrder = new int[n+1];
//        tree = new int[n+1];
//        for(int i = 1; i<=n; i++) {
//            posOrder[i] = scanner.nextInt();
//        }
//        index = 1;
//        CreateTree(posOrder,1);
//
//        for(int i = 1; i<= n; i++) {
//            System.out.print(tree[i]);
//            if(i<n) System.out.print(" ");
//        }
//    }
//
//    public static void CreateTree(int[] posOrder, int n) {
//       if(n >= posOrder.length) return;
//       CreateTree(posOrder,n*2);
//       CreateTree(posOrder,n*2+1);
//       tree[n] = posOrder[index++];
//    }
//}


import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) throws IOException {
        PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out));
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        Set<String> set = new HashSet<>();
        String[] list = new String[n];
        int index =0;
        for(int i =0 ;i <n; i++) {
            String str = br.readLine();
            if(!set.contains(str)) {
                set.add(str);
                list[index++] = str;
            }
        }
        Arrays.sort(list,0,index);
        for(int i =0 ; i<index; i++) {
            if(i<index-1) {
                pw.println(list[i]);
            }else {
                pw.print(list[i]);
            }
        }
        pw.flush();
    }
}